package oj;


import java.util.Scanner;

public class Day33F {
    private static int cut(String s,String t){
        int ans=s.indexOf(t);
        if(ans==-1){
            return 0;
        }
        return 1+cut(s.substring(ans+t.length()),t);

    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            String s=sc.next();
            String t=sc.next();
            int ret=cut(s,t);
            System.out.println(ret);

        }
    }
}